package com.neusoft.yuejian_6.model;

import com.neusoft.yuejian_6.javabean.Video;
import com.neusoft.yuejian_6.service.VideoService;

import java.util.List;

import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

import static com.neusoft.yuejian_6.base.Constant.BASE_URL;

/**
 * Created by Q on 2017/10/27.
 */

public class VideoModel {
    private Retrofit retrofit;
    public VideoModel(){
        retrofit=new Retrofit.Builder()
                .baseUrl(BASE_URL)
                .addConverterFactory(GsonConverterFactory.create())
                .build();
    }

    public Call<List<Video>> getVideos(int club_id){
        VideoService videoService=retrofit.create(VideoService.class);
        return  videoService.getAllVideos(club_id);

    }
//    public Call<Video> Classdetail(int video_id){
//        VideoService videoService=retrofit.create(VideoService.class);
//        return videoService.getVideoById(video_id);
//    }
}
